home *** CD-ROM | disk | FTP | other *** search
- Path: news2.EUnet.fr!enst!orfanos
- From: orfanos@ima.enst.fr
- Newsgroups: comp.lang.c++
- Subject: const's and Borland C++
- Date: 16 Feb 1996 18:03:52 GMT
- Organization: ENST - France
- Sender: orfanos@news.enst.fr (Dimitri Papadopoulos Orfanos)
- Distribution: world
- Message-ID: <4g2gu8$hpe@enst.enst.fr>
- NNTP-Posting-Host: mathieu-2.enst.fr
- Mime-Version: 1.0
- Content-Type: text/plain; charset=iso-8859-1
- Content-Transfer-Encoding: 8bit
-
-
- Hello,
-
- What's going here on with float const's and Borland C++ 4.5?
-
- --- MAGWEG.H ---
- const float FOO1 = 23.0;
- const float FOO2 = -62.33;
-
- --- MAGWEG.CPP ---
- #include "magweg.h"
-
- int main()
- {
- float f = FOO1;
- f /= 2;
-
- return 0;
- }
-
- --- compiler messages ---
- Compiling MAGWEG.CPP:
- Warning MAGWEG.H 1: Cannot create pre-compiled header:
- initialized data in header
- Warning MAGWEG.CPP 11: 'FOO2' is declared but never used
- Linking magweg.exe:
-
- The first warning should not be emitted, because I disabled
- it in Options|Project|Messages|General.
- The second warning should never be emitted. In fact, it appears
- only with float const's, not with int const's!
-
- Thank you for your help,
-
- Dimitri Papadopoulos
- (orfanos@ima.enst.fr)
-